package vip.liux.backend.infrastructure.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import vip.liux.contracts.infrastructure.messaging.handlers.MessageHandlerFactory;
import vip.liux.contracts.infrastructure.messaging.handlers.SmsMessageHandler;
import vip.liux.contracts.infrastructure.messaging.handlers.WebHookMessageHandler;

@Configuration(proxyBeanMethods = false)
public class AppConfiguration {

    @Configuration(proxyBeanMethods = false)
    static class MessagingConfiguration {

        @Bean
        public MessageHandlerFactory messageHandlerFactory() {
            return new MessageHandlerFactory();
        }

        @Bean
        public WebHookMessageHandler webHookMessageHandler() {
            return new WebHookMessageHandler();
        }

        @Bean
        public SmsMessageHandler smsMessageHandler() {
            return new SmsMessageHandler();
        }
    }
}
